﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace getMD5
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (args.Length == 0) Application.Run(new Form_MD5());
            else if (args.Length == 1)
            {
                string[] files = args[0].Split(';');
                string filesNames = Form_MD5.toSubDirFileNames(files);
                files = filesNames.Split(';');

                string tmp = Form_MD5.getFilesMD5(files);   // 计算文件MD5值
                Form_MD5.SaveProcess(tmp);
            }
        }
    }
}
